package net.minecraft.src;
import java.util.Random;

public class mod_shale extends BaseMod
{
    public static final Block Shale = new BlockShale(2412, 0).setHardness(3F).setResistance(3.0F).setBlockName("Shale");
    public static final Block Shale2 = new BlockShale2(2413, 0).setHardness(3F).setResistance(3.0F).setBlockName("Shale2");
    public static final Block Shale3 = new BlockShale3(2414, 0).setHardness(3F).setResistance(3.0F).setBlockName("Shale3");
    
    public mod_shale()
	{
       ModLoader.registerBlock(Shale);
       Shale.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Shale1.png");
       ModLoader.addName(Shale, "Shale");   
       
       ModLoader.registerBlock(Shale2);
       Shale.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Shale2.png");
       ModLoader.addName(Shale2, "Shale");   
       
       ModLoader.registerBlock(Shale3);
       Shale.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Shale3.png");
       ModLoader.addName(Shale3, "Shale"); 
       
	}
	public static Item Pick = new ItemPickaxe(2430, EnumToolMaterial.SHALE).setItemName("Pick");
	public static Item Spade = new ItemSpade(2431, EnumToolMaterial.SHALE).setItemName("Spade");
	public static Item Axe = new ItemAxe(2432, EnumToolMaterial.SHALE).setItemName("Axe");
	public static Item Hoe = new ItemHoe(2433, EnumToolMaterial.SHALE).setItemName("Hoe");
	public static Item Sword = new ItemSword(2434, EnumToolMaterial.SHALE).setItemName("Sword");
	public static Item Shaleext = new Item(2435).setItemName("Shaleext");
	{
		
		Pick.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/shalepick.png");
		Spade.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/shalespade.png");
		Axe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/shaleaxe.png");
		Hoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/shalehoe.png");
		Sword.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/shalesword.png");
		Shaleext.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Shaleext.png");
		
		ModLoader.addName(Pick, "Shale Pickaxe");
		ModLoader.addName(Spade, "Shale Shovel");
		ModLoader.addName(Axe, "Shale Axe");
		ModLoader.addName(Hoe, "Shale Hoe");
		ModLoader.addName(Sword, "Shale Sword");
		ModLoader.addName(Shaleext, "Shale Ext");
		
		
		ModLoader.addRecipe(new ItemStack(Pick, 1), new Object[] {
			"***", " # ", " # ", Character.valueOf('*'), mod_shale.Shaleext, Character.valueOf('#'), Item.stick
			});
			ModLoader.addRecipe(new ItemStack(Axe, 1), new Object[] {
			"** ", "*# ", " # ", Character.valueOf('*'), mod_shale.Shaleext, Character.valueOf('#'), Item.stick
			});
			ModLoader.addRecipe(new ItemStack(Spade, 1), new Object[] {
			" * ", " # ", " # ", Character.valueOf('*'), mod_shale.Shaleext, Character.valueOf('#'), Item.stick
			});
			ModLoader.addRecipe(new ItemStack(Hoe, 1), new Object[] {
			"** ", " # ", " # ", Character.valueOf('*'), mod_shale.Shaleext, Character.valueOf('#'), Item.stick
			});
			ModLoader.addRecipe(new ItemStack(Sword, 1), new Object[] {
			" * ", " * ", " # ", Character.valueOf('*'), mod_shale.Shaleext, Character.valueOf('#'), Item.stick
			});	
			ModLoader.addRecipe(new ItemStack(Shaleext, 1), new Object[] {
			"*#@", Character.valueOf('*'), Shale, Character.valueOf('#'), Shale2, Character.valueOf('@'), Shale3
			});
	}
	
    
    public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    {
    	for (int i=0; i < 35; i++)
    	{
    		int randPosX = chunkX + rand.nextInt(8);
    		int randPosY = rand.nextInt(49);
    		int randPosZ = chunkZ + rand.nextInt(8);
    		(new WorldGenMinable(Shale.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
    	}
    	   {
    	    	for (int i=0; i < 35; i++)
    	    	{
    	    		int randPosX = chunkX + rand.nextInt(8);
    	    		int randPosY = rand.nextInt(50);
    	    		int randPosZ = chunkZ + rand.nextInt(9);
    	    		(new WorldGenMinable(Shale2.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
    	    	}}
    	   
    	   {
   	    	for (int i=0; i < 35; i++)
   	    	{
   	    		int randPosX = chunkX + rand.nextInt(8);
   	    		int randPosY = rand.nextInt(50);
   	    		int randPosZ = chunkZ + rand.nextInt(9);
   	    		(new WorldGenMinable(Shale3.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
   	    	}}
    }
	public String getVersion()
	{
		return "1.2.3";
	}

    public void load() {
     
}}    